|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | SLAVE_ADDRESS 0x48 |
Functions | |
| void | main (void) |
| void | USCIB0_ISR (void) |
Variables | |
| uint8_t | TXData = 0 |
| #define SLAVE_ADDRESS 0x48 |
EUSCI_B0 I2C Slave TX multiple bytes to MSP430 Master
Description: This demo connects two MSP430's via the I2C bus. The master reads from the slave. This is the SLAVE code. The TX data begins at 0 and is incremented each time it is sent. A stop condition is used as a trigger to initialize the outgoing data. The USCI_B0 TX interrupt is used to know when to TX. Tested on MSP430F67791A
/|\ /|\
10k 10k
slave | | master --------------— | | --------------— -|XIN P2.6/UCB0SDA|<-|-—+->|P2.6/UCB0SDA XIN|- | | | | | -|XOUT | | | XOUT|- | P2.5/UCB0SCL|<-+---—>|P2.5/UCB0SCL | | | | |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 81 of file eusci_b_i2c_ex1_slaveTxMultiple.c.
| void main | ( | void | ) |
Definition at line 85 of file eusci_b_i2c_ex1_slaveTxMultiple.c.
References __no_operation(), and param.
| void USCIB0_ISR | ( | void | ) |
Definition at line 125 of file eusci_b_i2c_ex1_slaveTxMultiple.c.
References TXData.
| uint8_t TXData = 0 |
Definition at line 83 of file eusci_b_i2c_ex1_slaveTxMultiple.c.
Referenced by USCIB0_ISR().